import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import Components from 'unplugin-vue-components/vite';
import { VantResolver } from 'unplugin-vue-components/resolvers';
import postcssImport from "postcss-pxtorem"
export default defineConfig({
  plugins: [
      vue(),
      Components({
          resolvers: [VantResolver()],
      }),
  ],
    server:{
        host: '0.0.0.0'
    },
    // 适配
    css: {
        postcss: {
            plugins: [
                postcssImport({
                    // 这里的rootValue就是你的设计稿大小
                    rootValue: 37.5,
                    propList: ['*'],
                })
            ]
        }
    }
})
